DROP TABLE IF EXISTS jms_ods.tab_statistics ;
CREATE EXTERNAL TABLE jms_ods.tab_statistics (
ID            bigint        comment  ''自增主键'' ,                     --NUMBER(11)
WAY_BILL_NO            string        comment  ''运单号'' ,                     --NVARCHAR2(20)
ORDER_SOURCE            string        comment  ''订单来源'' ,                     --NVARCHAR2(10)
TRACE_TYPE            bigint        comment  ''调用物流估计标识'' ,                     --NUMBER(11)
LOGISTIC_TYPE            bigint        comment  ''订单轨迹推送标识'' ,                     --NUMBER(11)
SUBSCRIPTION_TYPE            bigint        comment  ''订阅物流轨迹标识'' ,                     --NUMBER(11)
CREATE_TIME            timestamp        comment  ''创建时间''                      --DATE
)
    COMMENT  ''访问edi接口记录明细表''
    PARTITIONED BY (dt STRING COMMENT ''时间分区'')
    STORED AS PARQUET
    LOCATION ''/dw/hive/jms_ods.db/external/tab_statistics''
    TBLPROPERTIES (
        ''discover.partitions'' = ''false'',
        ''parquet.column.index.access'' = ''true''
        );

MSCK REPAIR TABLE jms_ods.tab_statistics;
